package com.punai.customer.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.punai.customer.domain.CusMaterialItem;
import com.punai.customer.domain.bo.CusMaterialItemBo;
import com.punai.customer.domain.bo.StaClFeeBo;
import com.punai.customer.domain.request.CusMaterialItemRequest;
import com.punai.customer.domain.request.CusRewriteCodeRequest;

import java.util.List;

/**
 * 材料费用项Service接口
 *
 * @author zxw
 * @date 2022-12-04
 */
public interface ICusMaterialItemService extends IService<CusMaterialItem>
{
    /**
     * 查询材料费用项
     *
     * @param id 材料费用项主键
     * @return 材料费用项
     */
    public CusMaterialItemBo selectCusMaterialItemById(String id, Long companyId);

    /**
     * 查询材料费用项列表
     *
     * @param cusMaterialItem 材料费用项
     * @return 材料费用项集合
     */
    public List<CusMaterialItem> selectCusMaterialItemList(CusMaterialItem cusMaterialItem);

    /**
     * 新增材料费用项
     *
     * @param cusMaterialItem 材料费用项
     * @return 结果
     */
    public int insertCusMaterialItem(CusMaterialItemRequest cusMaterialItemRequest);

    /**
     * 修改材料费用项
     *
     * @param cusMaterialItem 材料费用项
     * @return 结果
     */
    public int updateCusMaterialItem(CusMaterialItemRequest cusMaterialItemRequest);

    /**
     * 批量删除材料费用项
     *
     * @param ids 需要删除的材料费用项主键集合
     * @return 结果
     */
    public int deleteCusMaterialItemByIds(List<String>  ids,Long companyId);

    int moveToChapter(String[] ids, String chapterId,Long companyId);

    Long countChapterIdIsZero(Long companyId);


    int rewriteCode(CusRewriteCodeRequest codeRequest);

    List<CusMaterialItem> validateCode(Long companyId);

    public StaClFeeBo getStaMaterialItemById(String id, Long companyId);
}
